package java67_8;

import java.util.Scanner;

public class BuyClothes {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int count = 0;
		String answer = "";
		for (int i = 1; i <= 5; i++) {
			System.out.println("进入了第" + i + "家店!");
			for (int j = 1; j <= 3; j++) {
				System.out.println("要离开吧?");
				answer = in.next();
				if (answer.equals("y")) {
					break;
				}
				System.out.println("买了一件");
				count++;
			}
			System.out.println("从第" + i + "家出来,逛累了不,亲爱的?");
			// 她要是说累了,逛街结束
		}
		System.out.println("逛街结束,买了几件?" + count);
	}

}
